<template>
  <a-modal
    :maskClosable="true"
    v-model="visible"
    :title="title"
    width="600px"
    :closable="true"
    footer=''
    destroyOnClose
  >
  <!-- 编辑选项组件 -->
    <list-data-manager
      :list="listData"
      v-model="editItemVal"
      :callBack="hideListDataModal"
      >
    </list-data-manager>
  </a-modal>
</template>
<script>
import {ListDataManager} from "@/components/Customize";
export default {
  data() {
    return {
      //显示状态
      visible: false,
      //选项值
      editItemVal:'',
      //选项列表
      listData: []
    };
  },
  components:{
    ListDataManager
  },
  methods: {
    //选项列表回调
    hideListDataModal(){
      this.$emit("ok",this.listData);
      this.visible = false;
    },
    //编辑
    edit(listData) {
      this.visible = true;
      this.listData = listData ;
    }
  },
};
</script>
<style lang="less">
.ant-form-item-with-help {
  margin-bottom: 10px;
}
</style>